// Enesea Win Device
// (c) jimon game studio

#ifndef JEH_CDEVICE_WIN
#define JEH_CDEVICE_WIN

#include "IDevice.h"
#include "CWindow_Win.h"

#ifdef JE_DEVICE_WIN

namespace je
{
	namespace device
	{
		//! Win32 Device
		class CDevice_Win:public je::device::IDevice
		{
		private:
			typedef jeList<CDevice_Win*> DeviceListType;
			static DeviceListType DeviceList;

			typedef jeList<CWindow_Win*> WindowListType;
			WindowListType WindowList;


		public:
			//! Constructor
			CDevice_Win();

			//! Destructor
			~CDevice_Win();

			#ifdef JE_WIN
			#undef CreateWindow
			#endif

			//! Create Window
			IWindow * CreateWindow(const jeVector2di & Size,const jeStringd & Title = NULL,u1 FullScreen = false,s32 Depth = 0,s32 Hertz = 0,s32 MSAA = 0,const void * PlatformIconId = NULL);

			//! Delete Window
			void DeleteWindow(IWindow * Window);

			//! Device Poll
			void DevicePoll();

			//! Get Window By HWND
			CWindow_Win * GetWindowByWin32Handle(HWND hWnd);

			//! Win32 Callback function
			static LRESULT CALLBACK WndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
		};
	}
}

#endif

#endif
